package com.wowo.day1;

import jdk.nashorn.internal.ir.annotations.Ignore;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface UserDao2 {
    @Insert("insert into users (name,age,pwd,birthday) values (#{name},#{age},#{pwd},#{birthday})")
    public void insertUser(User user);
    @Select("select * from users where id = #{id}")
    public User selectUserById(int id);
    @Update("update users set name = #{name},age = #{age},pwd = #{pwd},birthday=#{birthday} where id =#{id}")
    public void updateUser(User user);
    @Delete("delete from users where id = #{id}")
    public void deleteUser(int id);
    @Select("select *from users")
    public List<User> getAll();
}
